
class AssertTools:

    @staticmethod
    def assert_tools(response,status_code,code,msg):
        # 3.1 响应状态码
        assert response.status_code == status_code
        # 3.2 获取json数据
        data_json = response.json()
        # 3.3 断言code
        assert data_json.get('code') == code
        # 3.4 断言提示信息 操作成功、
        assert msg in data_json['message']
